﻿module DummyHost

open DocumentHost
open Uris


(* Mock loader and host used to test parsing *)

type DummyLoader () =
    interface IResourceLoader with
            member this.fetchImage(url:HttpUrl, handler) = ()


type DummyHost () =  
    interface IDocumentHost with
        member this.navigate(url:HttpUrl) =
            do System.Windows.MessageBox.Show("Navigate: " + url.toUrl()) |> ignore

        member this.submit (url:HttpUrl, httpMethod:string, encoding:string, data:(string*string) list) =
            do System.Windows.MessageBox.Show("Submit: " + url.toUrl()) |> ignore

        member this.log (txt:string) =
            do System.Windows.MessageBox.Show("Log: " + txt) |> ignore

